@charset "utf-8";
//Created by yangguo on 2016/7/4 0004.
/* General settings */
div.checker, div.radio {
    display: -moz-inline-box;
    display: inline-block;
    *display: inline;
    zoom: 1;
    vertical-align: middle;

    &,
    & * {
        margin: 0;
        padding: 0;
    }

    &:focus {
        outline: 0;
    }

    & span {
        &,
        &:before,
        &:after {
            text-align: center;
            text-rendering: optimizeLegibility;
            -webkit-font-smoothing: antialiased;
        }

        &:after {
            .opacity(0);
            transition: opacity .3s linear;
        }

        &.checked {
            &:after {
                .opacity(1);
            }
        }
    }

    &.disabled {
        &, &.active {
            & span {

                &.checked {

                    &:after {
                        color: darken(@btn-default-bg, 17%);
                    }
                }
            }
        }
    }

    &.active span {
        &:before {
            border-color: darken(@btn-default-border, 10%);
        }

        &.checked {
            border-color: darken(@btn-default-border, 10%);
        }
    }

    &.hover, &.focus {
        & span {
            &:before {
                border-color: darken(@btn-default-border, 5%);
            }

            &.checked {
                border-color: darken(@btn-default-border, 5%);
            }
        }
    }

    &.disabled {
        &, &.active {
            & span {
                background-color: @btn-default-bg;

                &.checked {
                    background-color: @btn-default-bg;

                    &:before {
                        border-color: darken(@btn-default-border, 17%);
                    }
                }
            }
        }
    }
}

/* Remove default webkit and possible mozilla .search styles.
 * Keeping this as :active to remove browser styles */
div.checker input,
input[type="search"],
input[type="search"]:active {
    -moz-appearance: none;
    -webkit-appearance: none;
}

/* Checkbox */
div.checker {
    position: relative;
    margin-right: 5px;

    &,
    & span,
    & input {
        width: 19px;
        height: 19px;
    }

    & input {
        opacity: 0;
        filter: alpha(opacity=0);
        -moz-opacity: 0;
        border: none;
        background: none;
        display: -moz-inline-box;
        display: inline-block;
        *display: inline;
        zoom: 1;
        position: absolute;
        top: 0;
        left: 0;
    }

    & span {
        display: -moz-inline-box;
        display: inline-block;
        *display: inline;
        zoom: 1;
        text-align: center;
        position: relative;
        background-color: white;

        &:before, &:after {
            content: " ";
            position: absolute;
            width: @base-unit-px;
            height: @base-unit-px;
            line-height: @base-unit-px;
            top: 0;
            left: 0;
        }

        &:before {
            display: block;
            border: 1px solid @border-base-color;
        }

        &:after {
            font-family: FontAwesome;
            color: @text-primary-color;
        }

        &.checked {
            &:after {
                content: "\f00c";
            }
        }
    }
}

/* Radio */
div.radio {
    position: relative;
    margin-right: 3px;
    background-image: none;

    &,
    & span,
    & input {
        width: @base-unit-px;
        height: @base-unit-px;
    }

    & span {
        display: -moz-inline-box;
        display: inline-block;
        *display: inline;
        zoom: 1;
        text-align: center;
        position: relative;
        border-radius: (@base-unit-px/2);

        &:before, &:after {
            content: " ";
            position: absolute;
            width: @base-unit-px;
            height: @base-unit-px;
            line-height: @base-unit-px;
        }

        &:before {
            display: block;
            border: 1px solid #ddd;
            border-radius: 9px;
            top: 0;
            left: 0;
        }

        &:after {
            width: @radio-check-width;
            height: @radio-check-width;
            border-radius: (@radio-check-width/2);
            margin: auto;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
        }

        &.checked {
            &:after {
                background-color: @text-primary-color;
            }
        }
    }

    & input {
        opacity: 0;
        filter: alpha(opacity=0);
        -moz-opacity: 0;
        border: none;
        background: none;
        display: -moz-inline-box;
        display: inline-block;
        *display: inline;
        zoom: 1;
        text-align: center;
    }

    &.disabled {
        &, &.active {
            & span {
                &:after {
                    background-color: darken(@btn-default-bg, 17%);;
                }
            }
        }
    }
}
